﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Happy.ExtentionMethods;

namespace Happy.Query.Filters
{
    /// <summary>
    /// 筛选器运算数。
    /// </summary>
    public sealed class Operand
    {
        /// <summary>
        /// 构造方法。
        /// </summary>
        public Operand(OperandType operandType, object value)
        {
            value.MustNotNull("value");

            this.OperandType = operandType;
            this.Value = value;
        }

        /// <summary>
        /// 运算数类型。
        /// </summary>
        public OperandType OperandType { get; private set; }

        /// <summary>
        /// 运算数类型对应的值。
        /// </summary>
        public object Value { get; private set; }
    }
}
